<template>
  <div class="home">
    <router-view></router-view>
    <!-- 底部导航栏tabbar -->
    <transition name="fade">
      <van-tabbar
        active-color="#e40137"
        inactive-color="#f699b4"
        route
        placeholder
        v-if="$route.meta.needTab"
      >
        <van-tabbar-item to="/home/first">
          <template #icon>
            <i class="iconfont f29">&#xe63d;</i>
          </template>
          <template #default>
            <div class="text">
              首页
            </div>
          </template></van-tabbar-item
        >
        <van-tabbar-item to="/home/search">
          <template #icon> <i class="iconfont f29">&#xe63f;</i> </template>
          <template #default>
            <div class="text">
              搜索
            </div>
          </template></van-tabbar-item
        >
        <van-tabbar-item to="/home/video">
          <template #icon> <i class="iconfont f29">&#xe63a;</i> </template>
          <template #default>
            <div class="text">
              视频
            </div>
          </template></van-tabbar-item
        >
        <van-tabbar-item to="/home/my">
          <template #icon> <i class="iconfont f29">&#xe64b;</i> </template>
          <template #default>
            <div class="text">
              我的
            </div>
          </template></van-tabbar-item
        >
      </van-tabbar>
    </transition>
  </div>
</template>

<script>
export default {
  data () {
    return {}
  }
}
</script>

<style lang="less" scoped>
.home {
  .f29 {
    font-size: 28px;
  }
  .text {
    font-size: 10px;
    font-family: PingFangSC, PingFangSC-Regular;
    font-weight: 400;
    text-align: left;
    line-height: 14px;
    letter-spacing: 0px;
  }
  // .fade-enter-active {
  //   transition: all 1s;
  // }
  // .fade-leave-active {
  //   transition: all 1s;
  // }
  // .fade-enter {
  //   opacity: 0;
  // }
  // .fade-leave-to {
  //   opacity: 0;
  // }
}
</style>
